
#pragma once
enum ElemType{
	EDGE2	=1,
	TRI3	=2,
	QUAD4	=3,
	TET4	=4,
	HEX8	=5,
	PRISM6	=6,
	PYRAMID5=7,
	EDGE3	=8,
	TRI6	=9,
	QUAD9	=10,
	TET10	=11,
	HEX27	=12,
	PRISM18	=13,
	PYRAMID14=14,
	NODE1	=15,
	QUAD8	=16,
	HEX20	=17,
	PRISM15	=18,
	PRISM13	=19,
	TRI9	=20,
	TRI10	=21,
	TRI12	=22,
	TRI15F	=23,
	TRI15I	=24,
	TRI21	=25,
	EDGE4	=26,
	EDGE5	=27,
	EDGE6	=28,
	TET20	=29,
	TET35	=30,
	TET56	=31,
	QUAD25  =37,
	HEX64	=92,
	HEX125	=93
};

struct ElementDefinition
  {
    ElementDefinition(ElemType type_in,
    				  ElemType type_out,
					  std::vector<unsigned int> _index) :
      type(type_in),
      type_out(type_out),
	  covert_index(_index)
    {}

    ElemType type;
    unsigned int type_out;
    std::vector<unsigned int> covert_index;
  };

struct ElementMaps
 {
   void add_def(const ElementDefinition & eledef)
   {
     out.insert(std::make_pair(eledef.type, eledef));
     in.insert(std::make_pair(eledef.type_out, eledef));
   }

   std::map<ElemType, ElementDefinition> out;
   std::map<unsigned int, ElementDefinition> in;
   std::map<std::pair<ElemType, ElemType> , std::vector<int> > _high2low_maps;
 };

 static ElementMaps _element_maps;

 static ElementMaps build_element_maps();


std::map<int, int> _node_map;
